from django import forms

class PubBlogForm(forms.Form):
    title = forms.CharField(max_length=200, min_length=2, error_messages={
        'required': '请传入博客标题！',
        'max_length': '博客标题长度不能超过200个字符！',
        'min_length': '博客标题长度不能少于2个字符！'
    })
    content = forms.CharField(min_length=2)
    category = forms.IntegerField()